Skip to content

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Jan 24, 2026

Automated Release PR

0.29.0 (2026-01-26)

Full Changelog: v0.28.0...v0.29.0

Features

  • client: add a convenient param.SetJSON helper (00e86b2)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

Introduces a helper to send raw JSON as request params.

  • Adds param.SetJSON([]byte, ptr) to serialize a param struct from raw JSON, ignoring struct fields
  • Supports this via new internal anyParamStruct pointer interface
  • Bumps version to 0.29.0; updates README, CHANGELOG, and OpenAPI spec metadata

Written by Cursor Bugbot for commit 594c98d. This will update automatically on new commits. Configure here.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 15540e4 to 594c98d Compare January 26, 2026 20:10
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

// Note: The struct's existing fields will be ignored; only the provided JSON is serialized.
func SetJSON(rawJSON []byte, ptr anyParamStruct) {
ptr.setMetadata(json.RawMessage(rawJSON))
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nil input causes inconsistent null detection behavior

Low Severity

When SetJSON receives a nil byte slice, it converts it to json.RawMessage(nil) (a typed nil) rather than treating it as a null value. This causes param.IsNull() to return false on the resulting struct, yet the struct serializes to "null". The inconsistency arises because setMetadata only recognizes untyped nil for setting metadataNull{}, while json.RawMessage(nil) is a typed nil that passes the override == nil check. This differs from Override[T](nil) which works correctly.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant